//
// Created by xili on 2024/8/7 18:54.
// Go big or go home.
//
#include <vector>
#include <unordered_map>

using namespace std;

class Solution {
public:
    int sumOfUnique(vector<int> &nums) {
        unordered_map<int, int> ump;
        for (auto &item: nums) {
            ump[item]++;
        }
        int ans = 0;
        for (auto &[val, n]: ump) {
            ans += n == 1 ? val : 0;
        }
        return ans;
    }
};